﻿using System;
using System.Collections.Generic;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

using SmlEngine.Graphics;
using SmlEngine.Sprites.Base;
using SmlEngine.Sprites.Collections;
using SmlEngine.Sprites.Components;
using SmlEngine.Sprites.Settings;

namespace SmlEngine.Sprites.Primitives
{
    //Could be made into a component, just testing.
    public abstract class BasicNpc : Npc
    {
        #region Fields

        private float jumpTime;

        private bool isJumping;
        private bool wasJumping;

        #endregion

        #region Properties

        protected virtual CollisionComponent CollisionComponent { get; set; }

        protected float MaxUpSpeed { get; set; }
        protected float MaxDownSpeed { get; set; }
        protected float MaxLeftSpeed { get; set; }
        protected float MaxRightSpeed { get; set; }

        #endregion

        public BasicNpc(Level owner)
            : base(owner)
        {
            CollisionComponent = new CollisionComponent(this);
        }

        public override void Update(GameTime gameTime)
        {
            float delta = gameTime.GetElapsedSeconds();

            Velocity = new Vector2(
                MathHelper.Clamp(Velocity.X, -MaxLeftSpeed, MaxRightSpeed),
                MathHelper.Clamp(Velocity.Y, -MaxUpSpeed, MaxDownSpeed));

            base.Update(gameTime);
        }

        public void Jump()
        {

        }
    }
}
